<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML>
<html>
<head>
	<title>项目管理系统</title>
	<link rel="stylesheet" href="static/css/bootstrap.min.css" />
	<style type="text/css">
		body{
			background-image:url(static/img/bg.png);
		}
	</style>
</head>
<body>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner"> 
			<div class="container">
				<a class="brand" href="#">Kaishengit PMS</a>
			</div>
		</div>
	</div>
	<div class="container">
		<div class="row" style="margin-top:60px">
			<div class="span3">
				<div class="well" style="padding:15px">
					<ul class="nav nav-list">
						<li class="nav-header" style="font-size:14px">${sessionScope.userProject.project.name }</li>
						<li class="divider"></li>
						<li><a href="project.jspx"><i class="icon-home"></i>最新动态</a></li>
						<li class="active"><a href="goal.jspx"><i class="icon-white icon-flag"></i>目标</a></li>
						<li><a href="document.jspx"><i class="icon-folder-open"></i>资料库</a></li>
						<li><a href="files.jspx"><i class="icon-file"></i>文件共享</a></li>
						<li><a href="contact.jspx"><i class="icon-user"></i>联系人</a></li>
						<li><a href="idea.jspx"><i class="icon-fire"></i>想法</a></li>
						<li><a href="#"><i class="icon-warning-sign"></i>Bug</a></li>
						<li><a href="set.jspx"><i class="icon-cog"></i>项目设置</a></li>
					</ul>
				</div>								
			</div>
			<div class="span9">								
				
				
				<ul class="breadcrumb" style="margin-top:20px;margin-bottom:0px;padding-left:20px">
					<li><i class="icon-th"></i>${sessionScope.goal.name }</li>
					<li style="float:right"><i class="icon-edit"></i><a href="goal.jspx?m=edit" class="link-black">编辑</a></li>
				</ul>
				<div style="border:1px solid #ccc; border-top:none;padding:15px;">
				<p>${sessionScope.goal.describe }</p>
				<div class="progress progress-danger progress-striped active" style="margin-top:15px">
					<div class="bar" style="width: 60%;">已完成60%</div>
				</div>
				<a class="btn" href="task.jspx?m=add"><i class="icon-plus"></i>添加新任务</a>
				<hr />
					
				<c:if test="${ empty taskList }">还没有任何任务</c:if>
				<c:forEach items="${taskList}" var = "task">
					<ul class="breadcrumb" style="margin-top:40px;margin-bottom:0px">
						<li><a href="task.jspx?task_id=${task.id }"><i class="icon-bookmark"></i>${task.name}</a>&nbsp;&nbsp;&nbsp;&nbsp;负责人：${task.user.name}</li>	
						<c:choose>
							<c:when test="${sessionScope.userProject.user.name == task.user.name}">
							<li style="float:right"><i class="icon-edit"></i><a href="task.jspx?m=edit&&id=${task.id }" class="link-black">编辑</a></li>
							</c:when>
						</c:choose>
					</ul>
					<div style="border:1px solid #ccc; border-top:none;padding:15px;">
						<p>${task.describe }</p>
						进度：<div class="progress progress-danger progress-striped active" style="margin-top:15px">
							<div class="bar" style="width: ${task.rate }%;">${task.rate }%</div>
						</div>
					</div>
				</c:forEach>
			</div>
		</div>
	</div>
</div>

</body>
</html>